package com.kk.xhr.admin.biz;

import com.kk.xhr.admin.controller.request.ApplyQueryRequest;
import com.kk.xhr.admin.controller.request.LeaveAddRequest;
import com.kk.xhr.admin.controller.vo.LeaveVo;
import com.kk.xhr.common.pojo.ApplyStatusEnum;
import com.kk.xhr.web.vo.PageVO;

/**
 * 请假biz接口
 *
 * @author luokexiong
 * @version 1.0 2021/2/19
 * @since 1.0.0
 */
public interface ILeaveBizService {

    /**
     * 分页查询请假申请
     *
     * @param userId  用户id
     * @param request ApplyQueryRequest
     * @return SignVo
     */
    PageVO<LeaveVo> queryPage(Long userId, ApplyQueryRequest request);

    /**
     * 分页查询请假申请
     *
     * @param userId  用户id
     * @param request ApplyQueryRequest
     * @return SignVo
     */
    PageVO<LeaveVo> queryPageCheck(Long userId, ApplyQueryRequest request);

    /**
     * 请假申请
     *
     * @param userId  用户id
     * @param request LeaveAddRequest
     */
    void leave(Long userId, LeaveAddRequest request);

    /**
     * 撤销申请
     *
     * @param id     主键id
     * @param status 状态
     */
    void modifyStatus(Long id, ApplyStatusEnum status);
}
